package com.renaud.solr.beanTest;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.google.common.base.Objects;

public class Client {
	
	private String speudo;
	private StatClient stats;
	private List<Client> followers = new ArrayList<Client>();
	
	
	public Client() {
		
	}
	
	public Client(String speudo, StatClient stats) {
		this.speudo = speudo;
		this.stats = stats;
	}
	
	public Client(String speudo, StatClient stats, List<Client> followers) {
		this.speudo = speudo;
		this.stats = stats;
		this.followers = followers;
	}

	public String getSpeudo() {
		return speudo;
	}
	public void setSpeudo(String speudo) {
		this.speudo = speudo;
	}
	public StatClient getStats() {
		return stats;
	}
	public void setStats(StatClient stats) {
		this.stats = stats;
	}
	
	public List<Client> getFollowers() {
		return followers;
	}

	public void setFollowers(List<Client> followers) {
		this.followers = followers;
	}

	public boolean equals(Object o){
		if (o == null){
	         return false;
	    }
	    if (getClass() != o.getClass()){
	         return false;
	    }
	    final Client other = (Client) o;
		 return Objects.equal(this.speudo,other.speudo)
				 &&  Objects.equal(this.stats,other.stats)
				 &&  Objects.equal(this.followers,other.followers);
	}
	
	public String toString(){
		return ToStringBuilder.reflectionToString(this,ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
